-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAS-133109 / 25.04 / Refactor PAM config generation #15218
base: master
Are you sure you want to change the base?
Conversation
This commit refactors how we generate custom PAM configuration lines so as to force them to run though a parser, and adds tests for said parser. pam_tty_audit is also enabled for interactive sessions for root account if for some reason a user gets interactive root session when GPOS STIG is enabled (this should never happen).
src/middlewared/middlewared/etc_files/pam.d/common-session.mako
Outdated
Show resolved
Hide resolved
PAMLine( | ||
pam_service=PAMService.AUTH, | ||
pam_control=( | ||
PAMControl(PAMResponse.SUCCESS, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
PAMControl(PAMResponse.SUCCESS, 1),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. 1
is what's used in current common-auth for a server attached to FreeIPA.
PAMLine( | ||
pam_service=PAMService.ACCOUNT, | ||
pam_control=( | ||
PAMControl(PAMResponse.SUCCESS, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In current code, attached to the FreeIPA I see the following in common-account
:
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so
Maybe this line should have 1
and not 2
?
PAMLine( | ||
pam_service=PAMService.AUTH, | ||
pam_control=( | ||
PAMControl(PAMResponse.SUCCESS, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. 1
is what's used in current common-auth for a server attached to FreeIPA.
This commit refactors how we generate custom PAM configuration lines so as to force them to run though a parser, and adds tests for said parser. pam_tty_audit is also enabled for interactive sessions for root account if for some reason a user gets interactive root session when GPOS STIG is enabled (this should never happen).